import Cookies from 'js-cookie'

const TokenKey = 'token'

export function getToken() {
  // return Cookies.get(TokenKey)
  // return sessionStorage.getItem(TokenKey)
  // return localStorage.getItem(TokenKey)
  return Cookies.get('app.token')
}

export function setToken(token) {
  // return Cookies.set(TokenKey, token)// 往session中存值
  sessionStorage.setItem(TokenKey, token)// 往sessionStorage中存值
}

export function removeToken() {
  // return Cookies.remove(TokenKey)
  return sessionStorage.removeItem(TokenKey)
}
